raar.agent.process.sensor
Class RADistanceSensor

java.lang.Object
  extended by raar.agent.process.RAProcess
      extended by raar.agent.process.sensor.RASensor
          extended by raar.agent.process.sensor.RARegionSensor
              extended by raar.agent.process.sensor.RARegionSensor_Pie
                  extended by raar.agent.process.sensor.RADistanceSensor
All Implemented Interfaces:
java.io.Serializable

public class RADistanceSensor
extends RARegionSensor_Pie

A sensor with a response to objects of a certain colour within a pie-piece- shaped region. Returns the distance to the nearest object of a certain colour, relative to the radius of the pie.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class raar.agent.process.sensor.RASensor
emulateRegisterNames, emulateRegisterObjects, output, outputName
 
Fields inherited from class raar.agent.process.RAProcess
hasRun, inregister, outregister, register, sourceCode, statement
 
Constructor Summary
RADistanceSensor(RAAgent agent)
          Construct the sensor.
 
Method Summary
 java.lang.String explain()
          Explain what the sensor does.
 java.awt.Color getColor()
          Colour representation.
 void setColor(java.awt.Color c)
           
 java.lang.String toString()
          String representation.
 
Methods inherited from class raar.agent.process.sensor.RARegionSensor_Pie
getDirection, getRadius, getRegion, getSectionWidth, setDirection, setRadius, setSectionWidth
 
Methods inherited from class raar.agent.process.sensor.RARegionSensor
run
 
Methods inherited from class raar.agent.process.sensor.RASensor
acceptsInput, dumpRegisters, execute, get, getAgent, getDataType, getInputNames, getInputObjects, getOutputNames, getOutputObjects, getSensorValue, isSpecial, set, setAgent, setOutput, setSourceCode, suppliesOutput
 
Methods inherited from class raar.agent.process.RAProcess
clone, getProcessName, getSourceCode, reset, setProcessName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RADistanceSensor

public RADistanceSensor(RAAgent agent)
Construct the sensor.

Method Detail

getColor

public java.awt.Color getColor()
Description copied from class: RASensor
Colour representation.

Overrides:
getColor in class RASensor

setColor

public void setColor(java.awt.Color c)

toString

public java.lang.String toString()
String representation.

Specified by:
toString in class RASensor

explain

public java.lang.String explain()
Explain what the sensor does.

Specified by:
explain in class RASensor